package com.yizhuoyan.his.webapi.controller.doctor.outpatient.vo;

import com.yizhuoyan.his.entity.DocHerbalPrescriptionDetailEntity;
import com.yizhuoyan.his.entity.DocHerbalPrescriptionEntity;
import com.yizhuoyan.his.entity.HosDrugsEntity;
import lombok.Data;

/**
 * 中草药处方
 */
@Data
public class DocHerbalPrescriptionVo {
    //处方类型========================
    private String prescriptionType;
    //付数============================
    private Integer payNumber;
    //频次============================
    private String frequency;
    //用法============================
    private String usageWay;
    //治法详细=========================
    private String therapyDetail;
    //医嘱============================
    private String advice;
    //状态============================
    private Integer state;

    //中草药处方详情
    private DocHerbalPrescriptionDetailVo detailVo;

    //药品
    private HosDrugsVo drugsVo;


    public static DocHerbalPrescriptionVo of(DocHerbalPrescriptionEntity e){
        DocHerbalPrescriptionVo vo=new DocHerbalPrescriptionVo();
        vo.setAdvice(e.getAdvice());
        vo.setFrequency(e.getFrequency());
        vo.setPayNumber(e.getPayNumber());
        vo.setPrescriptionType(e.getPrescriptionType());
        vo.setState(e.getState());
        vo.setTherapyDetail(e.getTherapyDetail());
        vo.setUsageWay(e.getUsageWay());
        return vo;
    }
}
